package velhaxo.testes;
public class SyncStatements
{
   public void instanceMethod1 ()
   {
      // Setup code.
	   System.out.println("setup");

      synchronized (this)
      {
         // Update file.
    	  System.out.println("updating file");
      }

      // Cleanup code.
      System.out.println("cleainin up");
   }

   public void instanceMethod2 ()
   {
      // Setup code.
	   System.out.println("setup");

      synchronized (this)
      {
         // Read from file.
    	  System.out.println("Reading file");
      }

      // Cleanup code.
      System.out.println("cleainin up");
   }
   
   public synchronized void simples()
   {
	   System.out.println();
   }
}